/**
*@Create:YMHUI
*@DateTime:2019/10/179:13
*@Description:TODO
**/
<template>
    <el-dialog
        title="维度设置"
        class="dimension_setting_dialog"
        :visible.sync="dimensionDialog"
        :modal-append-to-body="modalAppendToBody"
        width="70%"
        :show-close="false">
        <el-tabs type="border-card">
            <el-tab-pane label="维度管理">
                <dimension-manager ref="manager"></dimension-manager>
            </el-tab-pane>
            <el-tab-pane label="题目绑定">
                <topic-binding ref="binding"></topic-binding>
            </el-tab-pane>
        </el-tabs>
        <div slot="footer" class="dialog-footer">
            <el-button @click="dimensionDialog=false" type="primary">确定</el-button>
        </div>
    </el-dialog>
</template>

<script>
    import DimensionManager from "./DimensionManager";
    import TopicBinding from "./TopicBinding";
    import {mapActions, mapGetters} from 'vuex';

    export default {
        name: "DimensionSetting",
        components: {
            DimensionManager,
            TopicBinding
        },
        computed: {
            ...mapGetters('questionnaire', [
                'currentQuestionnaire'
            ])
        },
        data() {
            return {
                dimensions: [],
                questionnaire: {},
                dimensionDialog: false,
                modalAppendToBody: false
            }
        },
        methods: {
            ...mapActions('questionnaire', [
                'setCurrentQuestionnaire'
            ]),
            getDimensions(dimensions) {
                this.dimensions = dimensions;
            },
            open() {
                this.dimensionDialog = true;
            }
        },
        mounted() {
            this.questionnaire = this.currentQuestionnaire;
        }
    }
</script>

<style lang="scss" scoped>
    /*.dimension_setting_dialog {*/
    /*    display: flex;*/
    /*    justify-content: center;*/
    /*    align-items: Center;*/
    /*    overflow: hidden;*/
    /*    .el-dialog {*/
    /*        margin: 0 auto !important;*/
    /*        height: 60%;*/
    /*        overflow: hidden;*/

    /*        .el-dialog__body {*/
    /*            position: absolute;*/
    /*            left: 0;*/
    /*            top: 54px;*/
    /*            bottom: 0;*/
    /*            right: 0;*/
    /*            padding: 0;*/
    /*            z-index: 1;*/
    /*            overflow: hidden;*/
    /*            overflow-y: auto;*/
    /*        }*/
    /*    }*/
    /*}*/
</style>
